﻿using Demo.Framework.Camera;
using Microsoft.Xna.Framework;

namespace Demo.Framework
{
    public class GameEngine
    {
        #region Singleton

        private static GameEngine _instance;
        public static GameEngine Instance
        {
            get { return _instance ?? (_instance = new GameEngine()); }
        }

        #endregion

        public FreeCamera Camera
        {
            get { return _camera; }
        }

        private GraphicsDeviceManager _graphics;
        private FreeCamera _camera;

        public void Create(GraphicsDeviceManager graphics)
        {
            _graphics = graphics;

            //camera init
            _camera = new FreeCamera(_graphics.GraphicsDevice.Viewport, new Vector3(-4225, 160, 1080), new Vector3(0, 10, 0),_graphics.GraphicsDevice);
        }

        public void Update(GameTime gameTime)
        {
            //_camera.GetCurrentCamera();
            _camera.Update(gameTime);
        }
    }
}
